<h1><?= "$head_title" ?></h1>

<!-- Muestra mensajes sobre campos inválidos. -->
<?php if (!empty($messages)): ?>
<div>
	<?php foreach ($messages as $text): ?>
		<p><mark><?= $text ?>.</mark></p>
	<?php endforeach ?>
</div>
<?php endif ?>

<form method="POST" action="<?= $url_routes['login'] ?>">
	<input type="hidden" name="csrf" value="<?= $token ?>">
	<div>
		<label for="identity">Correo institucional o usuario</label>
		<input type="text" id="identity" name="identity" minlength="1" maxlength="255" autofocus required>
	</div>
	<div>
		<label for="password">Contraseña</label>
		<input type="password" id="password" name="password" minlength="6" maxlength="255" required>
	</div>
	<div>
		<input type="submit" name="login_submit" value="<?= "$head_title" ?>">
		<p>¿No tienes cuenta? <a href="<?= $url_routes['signup'] ?>">Regístrate en <?= $configuration['sitename'] ?></a>.</p>
	</div>
</form>